<?php
/*
 * @Author: your name
 * @Date: 2020-12-23 12:01:16
 * @LastEditTime: 2020-12-28 09:53:42
 * @LastEditors: Please set LastEditors
 * @Description: 服务器用户操作历史
 * @FilePath: /special/application/adminapiv3/controller/platform_manage/log/ServerOptionHistoryController.php
 */

namespace app\adminapiv3\controller\platform_manage\log;

//用户操作记录
use app\adminapiv3\controller\BaseController;
use app\adminapiv3\service\platform_manage\log\ServerOptionHistoryService;
use think\Request;

class ServerOptionHistoryController extends BaseController
{
    /**
     * @name 列表
     * @author wx
     * @date 2019/10/30 17:05
     */
    public function list(Request $request)
    {
        //接收参数
        $params = $request->only([
            'user_name','type','ip','content','status','ctime'
        ],'get');

        $server = new ServerOptionHistoryService();
        $list = $server->list($params);

        return $this->jsonOutPut($list);
    }

    /**
     * @name 首页数据
     * @author wx
     * @date 2019/10/30 17:05
     */
    public function indexData()
    {
        $server = new ServerOptionHistoryService();
        $list = $server->indexData();

        return $this->jsonOutPut($list);
    }


    /**
     * @name 日志详情
     * @author wx
     * @date 2020/10/26 10:28
     */
    public function detail(Request $request)
    {
        $params = $request->only([
            'id'
        ],'post');
        $this->validate($params,'ServerOptionHistory.detail');

        $server = new ServerOptionHistoryService();
        $info = $server->detail($params['id']);

        return $this->jsonOutPut($info);
    }
}